import http from "@/utils/fetch";

/**
 * 信息
 */
// 品类列表
export function categoryList(params) {
  return http.post("/Admin/BasicInfoManagement/categoryList", params);
}
// 获取品类信息
export function getCategoryInfo(params) {
  return http.get("/Admin/BasicInfoManagement/categoryInfo", params);
}
// 添加或编辑品类
export function updateCategory(params) {
  return http.post(
    "/Admin/BasicInfoManagement/addOrEditCategory",
    params,
    true
  );
}
// 根据id删除品类
export function delCategory(params) {
  return http.post("/Admin/BasicInfoManagement/delCategory", params, true);
}
// 定义表单项列表
export function formList(params) {
  return http.post("/Admin/BasicInfoManagement/defineFormList", params);
}
// 添加或编辑定义表单项
export function updateForm(params) {
  return http.post(
    "/Admin/BasicInfoManagement/addOrEditDefineForm",
    params,
    true
  );
}
// 根据id删除定义表单项
export function delForm(id) {
  return http.post(
    "/Admin/BasicInfoManagement/delDefineForm",
    { id: id },
    true
  );
}
// 订单来源列表
export function sourceList(params) {
  return http.post("/Admin/BasicInfoManagement/sourceList", params);
}
// 添加或编辑订单来源
export function updateSource(params) {
  return http.post("/Admin/BasicInfoManagement/addOrEditSource", params, true);
}
// 品类列表获取下拉选项
export function getAlipayCategory() {
  return http.get("/Admin/BasicInfoManagement/getAlipayCategory");
}
